Fox's Git Mirrors
docs/en/packet-debug.md 633735d797cc5f5d48cb2e22e8fd7cd743930daf (633735d7) Text, 2.71 KB
Packet debugging
Tools for decoding Reticulum on the wire and correlating silent drops.
Wireshark / tshark dissector
Lua plugin: T383838tools/wireshark/rns.lua
Load for one capture:
T282828
tshark -X lua_script:tools/wireshark/rns.lua -r capture.pcap -Y rns -V
Or copy T383838rns.lua into your Wireshark plugins directory.
The dissector registers a UDP heuristic and also binds ports 4242 and 7822 on UDP and TCP. Field names match T383838pkg/packet.DecodeFrame (T383838rns.packet_type, T383838rns.context_name, destination hash, hops).
Capture recipes
Loopback UDP between two local stacks:
T282828
# Linux example. Adjust ports to your interface listen/forward pair.
sudo tcpdump -i lo -w loopback.pcap udp portrange 40000-50000
Public mesh TCP uplink:
T282828
sudo tcpdump -i any -w mesh.pcap host rns.example and tcp port 4242
Before sharing captures, redact or omit payloads that may contain private app_data. Prefer posting rgodump JSONL summaries when possible.
rgodump
Decode hex or pcap UDP payloads to JSON lines:
T282828
make build
./bin/reticulum-go dump -hex <packethex>
./bin/reticulum-go dump -pcap capture.pcap
rgodump -pcap capture.pcap | head
Each line includes a frame object with packettypename, context_name, hashes, and sizes. The same decoder backs handshake vector replay tests under T383838pkg/packet.
Path and link health snapshot
T282828
./bin/reticulum-go snapshot -config ~/.reticulum-go
# or
rgosnap -config ~/.reticulum
JSON includes interface stats, path table rows, active link count, and transport health counters (including announce and path drop reasons). Requires shared-instance RPC like rgostatus.
Drop counters
New health kinds (also under each interface in interface_stats):
┌────────────────────────┬─────────────────────────────────────────────────────┐
│ Name │ Meaning │
├────────────────────────┼─────────────────────────────────────────────────────┤
│ announce_dup │ Duplicate announce ignored within TTL │
│ pathrespsuppressed │ PATH_RESPONSE skipped because next hop is requestor │
│ pathreqdup │ Duplicate path request tag ignored │
│ pathreqno_cache │ Known path but no cached announce to answer with │
│ pathrespqueued_skip │ PATH_RESPONSE already queued for same iface │
│ linkrelayunknown_iface │ Link relay dropped for unknown source iface │
└────────────────────────┴─────────────────────────────────────────────────────┘
Exposed in rgosnap as health and per-interface fields on T383838rgostatus -json.
Handshake reference vectors
T383838pkg/packet/testdata/handshake_vectors.json is regenerated by TestHandshakeVectorPackAndReplay. It stores raw hex plus expected decode trees for announce, PATH_RESPONSE, and LINKREQUEST frames.
T282828
go test ./pkg/packet/ -run TestHandshakeVectorPackAndReplay
Cross-stack timeline
Served by rngit 1.5.2 - Generated in 0.03s